Amateur packet radio enthusiasts nowadays send IP packets over radio links. Hanging off a serial port on their computer, TNC modems are used to provide CSMA-like behaviour so that the single radio channel can be shared between multiple stations (somewhat like how ethernet works). Packet radio is a broadcast medium, hence the TNC is responsible for sharing the bandwidth with other TNC's. The computer talking to the TNC must use a protocol called KISS (a simple derivative of SLIP encoding) to send/receive packets to/from the TNC.
AX25 packets vary in length. The packet header at the start of the packet has four parts:
The addresses found in the header are a simple 7-byte encoding of the HAM radio call sign and substation ID. These addresses are used just like ethernet hardware addresses are, to provide a unique name for each station. The protocol ID can choose between many protocols but users of IP-over-AX25 under Unix are really only concerned with two AX25 sub-protocols: ARP and IP.
AX25 packets (received via KISS encoding from the TNC) which are found to contain ARP or IP datagrams are decoded and handed off to the kernel networking code. Similarily, the network code gives outbound datagrams to the AX25 device driver, where the reverse process occurs: they are encapsulated in AX25 packets and, after KISS encoding, sent off to the TNC for transmission.
Both incoming and outgoing ARP datagrams require special handling. The Unix kernel's internal ARP cache contains translations between 4-byte IP addresses and 6-byte ethernet addresses. It's convenient to not rewrite the kernel's ARP implementation, so an encoding scheme was developed which converts 7-byte AX25 addresses to/from 6-byte ethernet addresses. This is too twisted to describe here, so refer to the device driver source.
PacComm. Operating Manual for PacComm Packet Controllers, pg. 31.
The README file supplied with this AX25 package.
TNC's that toggle DTR for each packet can cause problems because streams M_HANGUP and M_UNHANGUP messages are treated incorrectly. If you see console messages about M_HANGUP and M_UNHANGUP, cutting the DTR line will solve the problem.
William Graham (VE6UUG) <uug@indigo.cuc.ab.ca> [HAM]